package com.freightoa.sgl

import com.freightoa.foundation.net.ApiResultAdapterFactory
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object AppNet {
//    /**
//     * 项目主要服务器地址的[Retrofit]依赖提供方法
//     *
//     * @param okHttpClient OkHttpClient OkHttp客户端
//     * @return Retrofit
//     */
//    @Provides
//    @Singleton
//    fun provideMainRetrofit(okHttpClient: OkHttpClient): Retrofit {
//        return Retrofit.Builder()
//            .baseUrl("https://starcotest.freightoa.com/")
//            .addConverterFactory(GsonConverterFactory.create())
//            .addCallAdapterFactory(ApiResultAdapterFactory())
//            .client(okHttpClient)
//            .build()
//    }

}